package com.letou.ls.mode;

import java.util.ArrayList;
import java.util.List;

public class Col {

	/**
	 * 表项名称。
	 */
	private String mColName;
	/**
	 * 是否有url.
	 */
	private boolean isUrl;
	/**
	 * 所占的 列数。
	 */
	private int mColspan;
	/**
	 * 所站的行数。
	 */
	private int mRowspan;
	/**
	 * 是否是静态列。
	 */
	private boolean mStaticCol;
	/**
	 * 父结点。
	 */
	private Col mFatherCol;
	/**
	 * 子结点列表。
	 */
	private List<Col> mChildList;
	/**
	 * 子结点数量。
	 */
	private int mChildrenSize = 0;
	/**
	 * 子节点最大行数。
	 */
	private int mChildMaxRow = 0;
	/**
	 * 对应数列最大宽度。
	 */
	private float mDataWidth = 0;
	/**
	 * 当前结点显示字体大小
	 */
	private float mTextSize = 0;
	/**
	 * 所在行数。
	 */
	private int mNumber;
	/**
	 * 剩余高度。
	 */
	private int mOver;
	/**
	 * 文字颜色。
	 */
	private String mTextColor;
	/**
	 * 背景颜色。
	 */
	private String mBgColor;
	/**
	 * 一列数据颜色。
	 */
	private String mDataColor;

	private String stye;

	public String getmColName() {
		return mColName;
	}

	public void setmColName(String mColName) {
		this.mColName = mColName;
	}

	public boolean isUrl() {
		return isUrl;
	}

	public void setIsUrl(boolean isUrl) {
		this.isUrl = isUrl;
	}

	public String getStye() {
		return stye;
	}

	public void setStye(String stye) {
		this.stye = stye;
	}

	public int getmColspan() {
		return mColspan;
	}

	public void setmColspan(int mColspan) {
		this.mColspan = mColspan;
	}

	public int getmRowspan() {
		return mRowspan;
	}

	public void setmRowspan(int mRowspan) {
		this.mRowspan = mRowspan;
	}

	public boolean ismStaticCol() {
		return mStaticCol;
	}

	public void setmStaticCol(boolean mStaticCol) {
		this.mStaticCol = mStaticCol;
	}

	public Col getmFatherCol() {
		return mFatherCol;
	}

	public void setmFatherCol(Col mFatherCol) {
		this.mFatherCol = mFatherCol;
	}

	public List<Col> getmChildList() {
		return mChildList;
	}

	public void setmChildList(List<Col> mChildList) {
		this.mChildList = mChildList;
	}

	public int getmChildrenSize() {
		return mChildrenSize;
	}

	public float getmDataWidth() {
		return mDataWidth;
	}

	public void setmDataWidth(float mDataWidth) {
		this.mDataWidth = mDataWidth;
	}

	public float getmTextSize() {
		return mTextSize;
	}

	public void setmTextSize(float mTextSize) {
		this.mTextSize = mTextSize;
	}

	public void setmChildrenSize(int mChildrenSize) {
		this.mChildrenSize = mChildrenSize;
	}

	public void addChildren(Col col) {
		if (mChildList == null) {
			mChildList = new ArrayList<Col>();
			mChildrenSize = 0;
		}
		col.setmFatherCol(this);
		mChildList.add(col);
		mChildrenSize++;
	}

	public Col getCurrentChild() {
		if (mChildrenSize == 0) {
			return null;
		} else {
			return mChildList.get(mChildrenSize - 1);
		}
	}

	public int getmNumber() {
		return mNumber;
	}

	public void setmNumber(int mNumber) {
		this.mNumber = mNumber;
	}

	public int getmOver() {
		return mOver;
	}

	public void setmOver(int mOver) {
		this.mOver = mOver;
	}

	public String getmTextColor() {
		return mTextColor;
	}

	public void setmTextColor(String mTextColor) {
		this.mTextColor = mTextColor;
	}

	public String getmBgColor() {
		return mBgColor;
	}

	public void setmBgColor(String mBgColor) {
		this.mBgColor = mBgColor;
	}

	public String getmDataColor() {
		return mDataColor;
	}

	public void setmDataColor(String mDataColor) {
		this.mDataColor = mDataColor;
	}

	public int getmChildMaxRow() {
		return mChildMaxRow;
	}

	public void setmChildMaxRow(int mChildMaxRow) {
		this.mChildMaxRow = mChildMaxRow;
	}

}
